package com.eagle.common.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 
 * 用户角色对应表 数据库操作接口
 * 
 */
@Repository
public interface UserRRolesMapper<T,P> extends BaseMapper<T,P> {

	/**
	 * 根据UserId更新
	 */
	 public Integer updateByUserIdAndRoleId(@Param("bean") T t,@Param("userId") Integer userId,@Param("roleId") Integer roleId);


	/**
	 * 根据UserIdAndRoleId删除
	 */
	 public Integer deleteByUserIdAndRoleId(@Param("userId") Integer userId,@Param("roleId") Integer roleId);


	/**
	 * 根据UserIdAndRoleId获取对象
	 */
	 public T selectByUserIdAndRoleId(@Param("userId") Integer userId,@Param("roleId") Integer roleId);


}
